It's possible for an in-string to be bound to something and also be the beginning of a longer bound string. In this case the shell will wait a certain time to see if more characters are typed and if not it will execute the binding. This timeout is defined by the KEYTIMEOUT parameter; its default is 0.4 sec. No timeout is done if the prefix string is not bound.
For either in-string or out-string, control characters may be specified in the form ^X, and the backslash may be used to introduce one of the following escape sequences:
Multi-character in-strings cannot contain the null character ("^@" or "^ "). If they appear in a bindkey command, they will be silently translated to "\M-^@". This restriction does not apply to out-strings, single-character in-strings and the first character of a multi-char in-string.
The second form of cd substitutes the string new for the string old in the name of the current directory, and tries to change to this new directory.
The third form of cd extracts an entry from the directory stack, and changes to that directory. An argument of the form +n identifies a stack entry by counting from the left of the list shown by the dirs command, starting with zero. An argument of the form -n counts from the right. If the PUSHD_MINUS option is set, the meanings of + and - in this context are swapped.
The -E falg or the BSD_ECHO option can be used to disable these escape sequences. In the later case -e flag can be used to enable them.
fc -R reads the history from the given file, fc -W writes the history out to the given file, and fc -A appends the history out to the given file. fc -AI (-WI) appends (writes) only those events that are new since last incremental append (write) to the history file. In any case the file will have no more than SAVEHIST entries.
Each time it is invoked, getopts places the option letter it finds in the shell parameter name, prepended with a + when arg begins with a +. The index of the next arg is stored in OPTIND. The option argument, if any, is stored in OPTARG.
A leading : in optstring causes getopts to store the letter of the invalid option in OPTARG, and to set name to `?' for an unknown option and to `:' when a required option is missing. Otherwise, getopts prints an error message. The exit status is nonzero when there are no more options.
The -m option causes the arguments to be taken as patterns (they should be quoted) and the elements of the command hash table matching these patterns are printed.
The -r option causes the command hash table to be thrown out and restarted. The -f option causes the entire path to be searched, and all the commands found are added to the hash table. These options cannot be used with any arguments.
For each name with a corresponding value, put name in the command hash table, associating it with the pathname value. Whenever name is used as a command argument, the shell will try to execute the file given by value. For each name with no corresponding value, search for name in the path, and add it to the command hash table, and associating it with the discovered path, if it is found.
Adding the -d option causes hash to act on the named directory table instead of the command hash table. The remaing discussion of hash will assume that the -d is given.
If invoked without any arguments, and without any other options, hash -d lists the entire named directory table.
The -m option causes the arguments to be taken as patterns (they should be quoted) and the elements of the named directory table matching these patterns are printed.
The -r option causes the named directory table to be thrown out and restarted so that it only contains `~'. The -f option causes all usernames to be added to the named directory table. There options cannot be used with any arguments.
For each name with a corresponding value, put name in the named directory table. The directory name name is then associated with the specified path value, so that value may be referred to as `~name'. For each name with no corresponding value, search for as a username and as a parameter. If it is found, it is added to the named directory hash table.
resource is one of:
Which of these resource limits are available depends on the system. limit is a number, with an optional scaling factor, as follows:
The second form of pushd substitutes the string new for the string old in the name of the current directory, and tries to change to this new directory.
The third form of pushd changes directory by rotating the directory list. An argument of the form +n identifies a stack entry by counting from the left of the list shown by the dirs command, starting with zero. An argument of the form -n counts from the right. If the PUSHD_MINUS option is set, the meanings of + and - in this context are swapped.
Read one line and break it into fields using the characters in IFS as separators.
If the first argument contains a ?, the remainder of this word is used as a prompt on standard error when the shell is interactive. The exit status is 0 unless an end-of-file is encountered.
The -d option causes rehash to act on the named directory table instead of the command hash table. This reduces the named directory table to only the `~' entry. If the -f option is also used, the named directory table is rebuilt immediately.
rehash is equivalent to hash -r.
If return was executed from a trap, whether set by the trap builtin or by defining a TRAPxxx function, the effect is different for zero and non-zero return status. With zero status (or after an implicit return at the end of the trap), the shell will return to whatever it was previously processing; with a non-zero status, the shell will behave as interrupted except that the return status of the trap is retained. Note that the signal which caused the trap is passed as the first argument, so the statement `return $((128+$1))' will return the same status as if the signal had not been trapped.
Using + rather than - causes these flags to be turned off. If no arguments are given but flags are specified, a list of named parameters which have these flags set is printed. Using + instead of - keeps their values from being printed. If no arguments or options are given, the names and attributes of all parameters are printed. If only the -m flag is given the arguments are taken as patterns (should be quoted) and all parameters or functions (with the -f flag) with matching names are printed.